import apiServer from '../api';
import mockServer from '../api/mock';

const action = {
    getList: ({
        commit
    }) => {
        return apiServer.api.noveList();
    },
    getHd: ({
        commit
    }) => {
        return apiServer.api.haidong();
    },
    search: ({
        commit
    }, con) => {
        return apiServer.api.searchItme(con).then(res => {
            const _reData = res.data.data;
            if (res.status == 200) {
                commit('search', _reData)
            }
        });
    },
    getMock: ({
        commit
    }) => {
        return mockServer.mockData.mock1();
    }
}
export default {
    action
}